<!-- GIS弹窗 -->
<template>
  <div>
    <div class="GisPopup_hospital" v-show="type === 1">
      <div class="position">
        <div class="name">{{COMname}}</div>
        <div class="num_hospital">{{num}}</div>
      </div>
    </div>
    <div class="GisPopup_unit" v-show="type === 2">
      <div class="position">
        <div class="name">{{COMname}}</div>
        <div class="num_unit">{{num}}</div>
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Vue, Prop, Watch } from 'vue-property-decorator';

@Component({
  name: 'GisPopup',
  components: {},
})
export default class BhEveryCount extends Vue {
  @Prop({ default: '' }) private name: any;
  @Prop({ default: '000' }) private num: any;
  @Prop() private type: any;
  private classify: any = '';
  private FnClassify(): void {
    switch (this.type) {
      case 1:
        this.classify = '医院';
        break;
      case 2:
        this.classify = '单位';
        break;
      default:
        break;
    }
  }
  get COMname() {
            return this.name + this.classify;
        }
  private mounted() {
      this.FnClassify();
    }
}
</script>
<style lang="less" scoped>
.GisPopup_hospital {
  background-image: url('../../../../assets/img/GisPopup/gisbg.png');
  background-repeat: no-repeat;
  background-position: 0 0;
  width: 278px;
  height: 57px;
}
.GisPopup_unit {
  background-image: url('../../../../assets/img/GisPopup/gisbg.png');
  background-repeat: no-repeat;
  background-position: 0 -65px;
  width: 278px;
  height: 57px;
}
.position {
  position: absolute;
  top: 22px;
  left: 24px;
  width: 200px;
  height: 25px;
  display: flex;
  justify-content: center;
}
.name {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  font-style: italic;
  line-height: 25px;
  margin-right: 30px;
}

.num_hospital {
  color: #e54034;
  font-size: 18px;
  font-weight: 800;
  font-style: italic;
  line-height: 25px;
}
.num_unit {
  color: #14f791;
  font-size: 18px;
  font-weight: 800;
  font-style: italic;
  line-height: 25px;
}
</style>
